package com.ai.sys;

import com.ai.analysis.KwListener;
import com.ai.analysis.Noter;
import com.ai.hear.DictationOperator;
import com.ai.hear.UnderstaOperator;
import com.ai.speek.Speeker;
import com.ai.tool.CacheConst;
import com.iflytek.cloud.speech.SpeechConstant;
import com.iflytek.cloud.speech.SpeechUtility;

public class SystemRun {

	public void run() {
		try {
			openVoice();
			//
			System.out.println("已完成启动");
			CacheConst.getSpeeker().say("您好  小艾已完成启动 ");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * @Description 注册各项功能
	 * @param 参数
	 * @return void 返回类型
	 * @throws
	 */
	public void openVoice() {
		// api
		SpeechUtility.createUtility(SpeechConstant.APPID + "=569dcce8");
		// 语音识别
		//CacheConst.dop = new DictationOperator();
		// 语音识别
		CacheConst.uop = new UnderstaOperator();
		// 语音翻译记录
		CacheConst.noter = new Noter();
		// 关键词提取
		CacheConst.kls = new KwListener();
		// 语音播放
		CacheConst.speeker = new Speeker();
	}

}
